//
//  JKRFeedBottomLayout.m
//  JKRFeedDemo
//
//  Created by Lucky on 2017/12/10.
//  Copyright © 2017年 Lucky. All rights reserved.
//

#import "JKRFeedBottomLayout.h"

@implementation JKRFeedBottomLayout

- (instancetype)initWithModel:(JKRFeedDataModel *)model {
    self = [super init];
    
    if (model.order.order_type == 1) { // 陪玩
        switch (model.order.order_status) {
            case 1: // 已发布
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.buyButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                }
            }
                break;
            case 4: // 超时无人购买
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasBuyButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                }
            }
                break;
            case 6: // 老板买单
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if([model.order.payer.uid isEqualToString:CurrentUserID]) { // 老板
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.chatButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasBuyButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.payer.thumbnail;
                        NSString *userName = model.order.payer.username;
                        NSString *uid = model.order.payer.uid;
                        NSInteger baojiLevel = -1;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 7: // 超时未填写结果
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if([model.order.payer.uid isEqualToString:CurrentUserID]) { // 老板
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.chatButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasBuyButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.payer.thumbnail;
                        NSString *userName = model.order.payer.username;
                        NSString *uid = model.order.payer.uid;
                        NSInteger baojiLevel = -1;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 8: // 填写结果-打了
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if([model.order.payer.uid isEqualToString:CurrentUserID]) { // 老板
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.startButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                        self.chatButtonFrame = CGRectMake(kScreenWidth - 90 - 15 - 100, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasBuyButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.payer.thumbnail;
                        NSString *userName = model.order.payer.username;
                        NSString *uid = model.order.payer.uid;
                        NSInteger baojiLevel = -1;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 9: // 填写结果-没打
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if([model.order.payer.uid isEqualToString:CurrentUserID]) { // 老板
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.chatButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasBuyButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.payer.thumbnail;
                        NSString *userName = model.order.payer.username;
                        NSString *uid = model.order.payer.uid;
                        NSInteger baojiLevel = -1;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 10: // 填写打了超时未确认或者确认服务
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if([model.order.payer.uid isEqualToString:CurrentUserID]) { // 老板
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.chatButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasBuyButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.payer.thumbnail;
                        NSString *userName = model.order.payer.username;
                        NSString *uid = model.order.payer.uid;
                        NSInteger baojiLevel = -1;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 11: // 发起投诉
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if([model.order.payer.uid isEqualToString:CurrentUserID]) { // 老板
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.chatButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasBuyButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.payer.thumbnail;
                        NSString *userName = model.order.payer.username;
                        NSString *uid = model.order.payer.uid;
                        NSInteger baojiLevel = -1;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 12: // 申诉成功
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if([model.order.payer.uid isEqualToString:CurrentUserID]) { // 老板
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.chatButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasBuyButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.payer.thumbnail;
                        NSString *userName = model.order.payer.username;
                        NSString *uid = model.order.payer.uid;
                        NSInteger baojiLevel = -1;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 13: // 申诉失败
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if([model.order.payer.uid isEqualToString:CurrentUserID]) { // 老板
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.chatButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasBuyButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.payer.thumbnail;
                        NSString *userName = model.order.payer.username;
                        NSString *uid = model.order.payer.uid;
                        NSInteger baojiLevel = -1;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            default:
                break;
        }
    } else if (model.order.order_type == 2) { // 约玩
        switch (model.order.order_status) {
            case 1: // 已发布
            {
                BOOL isSignUp = NO;
                for (JKRFeedOrderCandidate *candidate in model.order.candidates) {
                    if ([candidate.uid isEqualToString:CurrentUserID]) {
                        isSignUp = YES;
                        break;
                    }
                }
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if(isSignUp) { // 报名者
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.cancelSignUpButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        
                        NSMutableAttributedString *btString = [[NSMutableAttributedString alloc] initWithString:@"等待老板选择"];
                        btString.font = [UIFont systemFontOfSize:12];
                        btString.color = UIColorHex(A9ACB5);
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 15 - 115, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:btString];
                        self.statusBottomLabelFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5, self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height);
                    }
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.signUpButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                }
            }
                break;
            case 2: // 超时无人报名
            {
                BOOL isSignUp = NO;
                for (JKRFeedOrderCandidate *candidate in model.order.candidates) {
                    if ([candidate.uid isEqualToString:CurrentUserID]) {
                        isSignUp = YES;
                        break;
                    }
                }
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasSignUpButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                }
            }
                break;
            case 3: // 超时未选大神
            {
                BOOL isSignUp = NO;
                for (JKRFeedOrderCandidate *candidate in model.order.candidates) {
                    if ([candidate.uid isEqualToString:CurrentUserID]) {
                        isSignUp = YES;
                        break;
                    }
                }
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = model.order.tracking.desc;
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasSignUpButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        self.statusBottomImageViewURL = nil;
                        self.statusBottomImageViewFrame = CGRectZero;
                        self.statusBottomLabelFrame = CGRectZero;
                        self.statusBottomLabelLayout = nil;
                    }
                }
            }
                break;
            case 5: // 选择大神
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if ([model.order.candidate.uid isEqualToString:CurrentUserID]) { // 大神
                    
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasSignUpButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.candidate.thumbnail;
                        NSString *userName = model.order.candidate.username;
                        NSString *uid = model.order.candidate.uid;
                        NSInteger baojiLevel = 100;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 7: // 超时未填写结果
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if ([model.order.candidate.uid isEqualToString:CurrentUserID]) { // 大神
                    
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasSignUpButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.candidate.thumbnail;
                        NSString *userName = model.order.candidate.username;
                        NSString *uid = model.order.candidate.uid;
                        NSInteger baojiLevel = 100;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 8: // 填写结果-打了
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if ([model.order.candidate.uid isEqualToString:CurrentUserID]) { // 大神
                    
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasSignUpButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.candidate.thumbnail;
                        NSString *userName = model.order.candidate.username;
                        NSString *uid = model.order.candidate.uid;
                        NSInteger baojiLevel = 100;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 9: // 填写结果-没打
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if ([model.order.candidate.uid isEqualToString:CurrentUserID]) { // 大神
                    
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasSignUpButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.candidate.thumbnail;
                        NSString *userName = model.order.candidate.username;
                        NSString *uid = model.order.candidate.uid;
                        NSInteger baojiLevel = 100;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 10: // 填写打了超时未确认或者确认服务
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if ([model.order.candidate.uid isEqualToString:CurrentUserID]) { // 大神
                    
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasSignUpButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.candidate.thumbnail;
                        NSString *userName = model.order.candidate.username;
                        NSString *uid = model.order.candidate.uid;
                        NSInteger baojiLevel = 100;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 11: // 发起投诉
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if ([model.order.candidate.uid isEqualToString:CurrentUserID]) { // 大神
                    
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasSignUpButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.candidate.thumbnail;
                        NSString *userName = model.order.candidate.username;
                        NSString *uid = model.order.candidate.uid;
                        NSInteger baojiLevel = 100;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 12: // 申诉成功
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if ([model.order.candidate.uid isEqualToString:CurrentUserID]) { // 大神
                    
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasSignUpButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.candidate.thumbnail;
                        NSString *userName = model.order.candidate.username;
                        NSString *uid = model.order.candidate.uid;
                        NSInteger baojiLevel = 100;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            case 13: // 申诉失败
            {
                if ([model.feed.author.uid isEqualToString:CurrentUserID]) { // 发布者
                    self.show = NO;
                } else if ([model.order.candidate.uid isEqualToString:CurrentUserID]) { // 大神
                    
                } else { // 游客
                    self.show = YES;
                    
                    {
                        NSString *status = @"已结束";
                        NSMutableAttributedString *statusString =[[NSMutableAttributedString alloc] initWithString:status];
                        statusString.font = [UIFont systemFontOfSize:12];
                        statusString.color = UIColorHex(FFA718);
                        {
                            YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT)];
                            container.maximumNumberOfRows = 1;
                            self.statusLabelLayout = [YYTextLayout layoutWithContainer:container text:statusString];
                            self.statusLabelFrame = CGRectMake(kScreenWidth - 17 - self.statusLabelLayout.textBoundingRect.size.width, 0, self.statusLabelLayout.textBoundingRect.size.width, self.statusLabelLayout.textBoundingRect.size.height);
                        }
                        self.bottomLineViewFrame = CGRectMake(15, 73.5, kScreenWidth - 15, 0.5);
                    }
                    
                    {
                        self.chatButtonFrame = CGRectZero;
                        self.hasBuyButtonFrame = CGRectZero;
                        self.buyButtonFrame = CGRectZero;
                        self.startButtonFrame = CGRectZero;
                        self.finishButtonFrame = CGRectZero;
                        self.signUpButtonFrame = CGRectZero;
                        self.cancelSignUpButtonFrame = CGRectZero;
                        self.hasSignUpButtonFrame = CGRectZero;
                        
                        self.hasSignUpButtonFrame = CGRectMake(kScreenWidth - 90 - 15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 90, 30);
                    }
                    
                    {
                        NSString *userImageURL = model.order.candidate.thumbnail;
                        NSString *userName = model.order.candidate.username;
                        NSString *uid = model.order.candidate.uid;
                        NSInteger baojiLevel = 100;
                        self.statusBottomImageViewFrame = CGRectMake(15, CGRectGetMaxY(self.statusLabelFrame) + (84 - 30 - 10 - self.statusLabelFrame.size.height) * 0.5, 30, 30);
                        self.statusBottomImageViewURL = [NSURL URLWithString:userImageURL];
                        
                        NSMutableAttributedString *bottomString = [NSMutableAttributedString new];
                        
                        NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:userName];
                        nameString.color = UIColorHex(A7ABB4);
                        nameString.font = [UIFont systemFontOfSize:12];
                        YYTextHighlight *highLight = [YYTextHighlight new];
                        highLight.userInfo = @{kFeedTopClickUser:uid};
                        [nameString setTextHighlight:highLight range:nameString.string.rangeOfAll];
                        [bottomString appendAttributedString:nameString];
                        
                        
                        if (baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) {
                            NSAttributedString *bjString = [self attributedStringWithImageSize:CGSizeMake(31, 15) image:[JKRFeedDetailHelper imageNamed:[NSString stringWithFormat:@"bj_%zd", baojiLevel]]];
                            [bottomString appendAttributedString:bjString];
                        }
                        
                        NSMutableAttributedString *tailString = [[NSMutableAttributedString alloc] initWithString:@"接了此单"];
                        tailString.font = [UIFont systemFontOfSize:12];
                        tailString.color = UIColorHex(4990E2);
                        [bottomString appendAttributedString:tailString];
                        
                        bottomString.lineBreakMode = NSLineBreakByTruncatingMiddle;
                        YYTextContainer *container = [YYTextContainer containerWithSize:CGSizeMake(kScreenWidth - 55 - 90 - 15 - 10, MAXFLOAT)];
                        self.statusBottomLabelLayout = [YYTextLayout layoutWithContainer:container text:bottomString];
                        self.statusBottomLabelFrame = CGRectMake(55, CGRectGetMaxY(self.statusLabelFrame) + (84 - self.statusBottomLabelLayout.textBoundingRect.size.height - 10 - self.statusLabelFrame.size.height - 2) * 0.5 - ((baojiLevel == 100 || baojiLevel == 101 || baojiLevel == 102) ? 8 : 0), self.statusBottomLabelLayout.textBoundingRect.size.width, self.statusBottomLabelLayout.textBoundingRect.size.height + 2);
                    }
                }
            }
                break;
            default:
                break;
        }
        
    }
    
    self.bottomFrame = CGRectMake(0, 0, kScreenWidth, 84);
    
    return self;
}

- (NSAttributedString *)attributedStringWithImageSize:(CGSize)size image:(UIImage *)image {
    CGFloat ascent = size.width * 0.86;
    CGFloat descent = size.height * 0.14;
    CGRect bounding = CGRectMake(0, -0.14 * size.width + 2, size.width * 0.9, size.height * 0.9);
    UIEdgeInsets contentInsets = UIEdgeInsetsMake(ascent - (bounding.size.height + bounding.origin.y), 0, descent + bounding.origin.y, 0);
    
    YYTextRunDelegate *delegate = [YYTextRunDelegate new];
    delegate.ascent = ascent;
    delegate.descent = descent;
    delegate.width = bounding.size.width;
    
    YYTextAttachment *attachment = [YYTextAttachment new];
    attachment.contentMode = UIViewContentModeScaleAspectFit;
    attachment.contentInsets = contentInsets;
    attachment.content = image;
    
    NSMutableAttributedString *atr = [[NSMutableAttributedString alloc] initWithString:YYTextAttachmentToken];
    [atr setTextAttachment:attachment range:NSMakeRange(0, atr.length)];
    CTRunDelegateRef ctDelegate = delegate.CTRunDelegate;
    [atr setRunDelegate:ctDelegate range:NSMakeRange(0, atr.length)];
    if (ctDelegate) CFRelease(ctDelegate);
    
    return atr;
}

@end
